home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DJGPP / QDDVX102.ZIP / contrib / dvx / inc / x11 / intrinsi.h < prev    next >
Text File  |  1993-07-15  |  63KB  |  2,574 lines

  1. /*
  2. * $XConsortium: Intrinsic.h,v 1.139 90/08/22 14:21:01 swick Exp $
  3. * $oHeader: Intrinsic.h,v 1.10 88/09/01 10:33:34 asente Exp $
  4. */
  5.  
  6. /***********************************************************
  7. Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
  8. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  9.  
  10.             All Rights Reserved
  11.  
  12. Permission to use, copy, modify, and distribute this software and its 
  13. documentation for any purpose and without fee is hereby granted, 
  14. provided that the above copyright notice appear in all copies and that
  15. both that copyright notice and this permission notice appear in 
  16. supporting documentation, and that the names of Digital or MIT not be
  17. used in advertising or publicity pertaining to distribution of the
  18. software without specific, written prior permission.  
  19.  
  20. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  21. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  22. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  23. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  25. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  26. SOFTWARE.
  27.  
  28. ******************************************************************/
  29.  
  30. #ifndef _XtIntrinsic_h
  31. #define _XtIntrinsic_h
  32.  
  33. #include    <X11/Xlib.h>
  34. #include    <X11/Xutil.h>
  35. #include    <X11/Xresource.h>
  36. #include    <X11/Xos.h>
  37.  
  38. #define XtSpecificationRelease 4
  39.  
  40. #ifdef XTFUNCPROTO
  41. #undef NeedFunctionPrototypes
  42. #define NeedFunctionPrototypes 1
  43. #else
  44. #undef NeedFunctionPrototypes
  45. #define NeedFunctionPrototypes 0
  46. #undef NeedWidePrototypes
  47. #define NeedWidePrototypes 0
  48. #endif
  49.  
  50. #ifndef NeedFunctionPrototypes
  51. #if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus)
  52. #define NeedFunctionPrototypes 1
  53. #else
  54. #define NeedFunctionPrototypes 0
  55. #endif /* __STDC__ */
  56. #endif /* NeedFunctionPrototypes */
  57.  
  58. /* NeedVarargsPrototypes is temporary until function prototypes work everywhere */
  59. #ifndef NeedVarargsPrototypes
  60. #if defined(FUNCPROTO) || defined(__STDC__) || defined(__cplusplus) || defined(c_plusplus) || NeedFunctionPrototypes
  61. #define NeedVarargsPrototypes 1
  62. #else
  63. #define NeedVarargsPrototypes 0
  64. #endif /* __STDC__ */
  65. #endif /* NeedVarargsPrototypes */
  66.  
  67. typedef char *String;
  68.  
  69. #if defined(__cplusplus) || defined(c_plusplus)
  70. #define CONST const
  71. /* make const String do the right thing */
  72. #define String char*
  73. #else
  74. #define CONST
  75. #endif /* __cplusplus */
  76.  
  77. #ifndef NeedWidePrototypes
  78. #if defined(NARROWPROTO)
  79. #define NeedWidePrototypes 0
  80. #else
  81. #define NeedWidePrototypes 1        /* default to make interropt. easier */
  82. #endif
  83. #endif
  84.  
  85. #include <sys\param.h>
  86.  
  87. #ifndef DIRECTORY_SEPERATOR /* POHC 91/06/07 */
  88. #ifdef MSDOS /* POHC 90/12/07 */
  89. #define DIRECTORY_SEPERATOR '\\'
  90. #else /* MSDOS */
  91. #define DIRECTORY_SEPERATOR '/'
  92. #endif /* MSDOS */
  93. #endif /* DIRECTORY_SEPERATOR */
  94.  
  95. #ifndef PATH_SEPERATOR /* POHC 91/06/21 */
  96. #ifdef MSDOS
  97. #define PATH_SEPERATOR ';'
  98. #else /* MSDOS */
  99. #define PATH_SEPERATOR ':'
  100. #endif /* MSDOS */
  101. #endif /* PATH_SEPERATOR */
  102.  
  103. #ifdef VMS
  104. #define externalref globalref
  105. #define externaldef(psect) globaldef {"psect"} noshare
  106. #else
  107. #define externalref extern
  108. #define externaldef(psect)
  109. #endif /* VMS */
  110.  
  111. #ifndef FALSE
  112. #define FALSE 0
  113. #define TRUE 1
  114. #endif
  115.  
  116. #define XtNumber(arr)        ((Cardinal) (sizeof(arr) / sizeof(arr[0])))
  117.  
  118. typedef struct _WidgetRec *Widget;
  119. typedef Widget *WidgetList;
  120. typedef struct _WidgetClassRec *WidgetClass;
  121. typedef struct _CompositeRec *CompositeWidget;
  122. typedef struct _XtActionsRec *XtActionList;
  123. typedef struct _XtEventRec *XtEventTable;
  124. typedef struct _XtBoundAccActionRec *XtBoundAccActions;
  125.  
  126. typedef struct _XtAppStruct *XtAppContext;
  127. typedef unsigned long    XtValueMask;
  128. typedef unsigned long    XtIntervalId;
  129. typedef unsigned long    XtInputId;
  130. typedef unsigned long    XtWorkProcId;
  131. typedef unsigned int    XtGeometryMask;
  132. typedef unsigned long    XtGCMask;   /* Mask of values that are used by widget*/
  133. typedef unsigned long    Pixel;        /* Index into colormap        */
  134. typedef int        XtCacheType;
  135. #define            XtCacheNone      0x001
  136. #define            XtCacheAll      0x002
  137. #define            XtCacheByDisplay  0x003
  138. #define            XtCacheRefCount      0x100
  139.  
  140. /****************************************************************
  141.  *
  142.  * System Dependent Definitions; see spec for specific range
  143.  * requirements.  Do not assume every implementation uses the
  144.  * same base types!
  145.  *
  146.  *
  147.  * XtArgVal ought to be a union of XtPointer, char *, long, int *, and proc *
  148.  * but casting to union types is not really supported.
  149.  *
  150.  * So the typedef for XtArgVal should be chosen such that
  151.  *
  152.  *    sizeof (XtArgVal) >=    sizeof(XtPointer)
  153.  *                sizeof(char *)
  154.  *                sizeof(long)
  155.  *                sizeof(int *)
  156.  *                sizeof(proc *)
  157.  *
  158.  * ArgLists rely heavily on the above typedef.
  159.  *
  160.  ****************************************************************/
  161. #ifdef CRAY
  162. typedef long        Boolean;
  163. typedef char*        XtArgVal;
  164. typedef long        XtEnum;
  165. #else
  166. typedef char        Boolean;
  167. typedef long        XtArgVal;
  168. typedef unsigned char    XtEnum;
  169. #endif
  170.  
  171. typedef unsigned int    Cardinal;
  172. typedef unsigned short    Dimension;  /* Size in pixels            */
  173. typedef short        Position;   /* Offset from 0 coordinate        */
  174.  
  175. #ifdef __STDC__
  176. typedef void*        XtPointer;
  177. #else
  178. typedef char*        XtPointer;
  179. #endif
  180.  
  181. typedef XtPointer    Opaque;
  182.  
  183. #include <X11/Core.h>
  184. #include <X11/Composite.h>
  185. #include <X11/Constraint.h>
  186. #include <X11/Object.h>
  187. #include <X11/RectObj.h>
  188.  
  189. typedef struct _TranslationData *XtTranslations;
  190. typedef struct _TranslationData *XtAccelerators;
  191. typedef unsigned int Modifiers;
  192.  
  193. typedef void (*XtActionProc)(
  194. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  195.     Widget         /* widget */,
  196.     XEvent*        /* event */,
  197.     String*        /* params */,
  198.     Cardinal*        /* num_params */
  199. #endif
  200. );
  201.  
  202. typedef XtActionProc* XtBoundActions;
  203.  
  204. typedef struct _XtActionsRec{
  205.     String     string;
  206.     XtActionProc proc;
  207. } XtActionsRec;
  208.  
  209. typedef enum _XtAddressMode { /* Added Tag. POHC 91/01/16 */
  210. /* address mode        parameter representation    */
  211. /* ------------        ------------------------    */
  212.     XtAddress,        /* address            */
  213.     XtBaseOffset,    /* offset            */
  214.     XtImmediate,    /* constant            */
  215.     XtResourceString,    /* resource name string        */
  216.     XtResourceQuark,    /* resource name quark        */
  217.     XtWidgetBaseOffset,    /* offset from ancestor        */
  218.     XtProcedureArg    /* procedure to invoke        */
  219. } XtAddressMode;
  220.  
  221. typedef struct _XtConvertArgRec { /* Added Tag. POHC 91/01/16 */
  222.     XtAddressMode   address_mode;
  223.     XtPointer        address_id;
  224.     Cardinal        size;
  225. } XtConvertArgRec, *XtConvertArgList;
  226.  
  227. typedef void (*XtConvertArgProc)(
  228. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  229.     Widget         /* widget */,
  230.     Cardinal*        /* size */,
  231.     XrmValue*        /* value */
  232. #endif
  233. );
  234.  
  235. typedef struct _XtWidgetGeometry { /* Added Tag. POHC 91/01/16 */
  236.     XtGeometryMask request_mode;
  237.     Position x, y;
  238.     Dimension width, height, border_width;
  239.     Widget sibling;
  240.     int stack_mode;   /* Above, Below, TopIf, BottomIf, Opposite, DontChange */
  241. } XtWidgetGeometry;
  242.  
  243. /* Additions to Xlib geometry requests: ask what would happen, don't do it */
  244. #define XtCWQueryOnly    (1 << 7)
  245.  
  246. /* Additions to Xlib stack modes: don't change stack order */
  247. #define XtSMDontChange    5
  248.  
  249. typedef void (*XtConverter)(
  250. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  251.     XrmValue*        /* args */,
  252.     Cardinal*        /* num_args */,
  253.     XrmValue*        /* from */,
  254.     XrmValue*        /* to */
  255. #endif
  256. );
  257.  
  258. typedef Boolean (*XtTypeConverter)(
  259. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  260.     Display*        /* dpy */,
  261.     XrmValue*        /* args */,
  262.     Cardinal*        /* num_args */,
  263.     XrmValue*        /* from */,
  264.     XrmValue*        /* to */,
  265.     XtPointer*        /* converter_data */
  266. #endif
  267. );
  268.  
  269. typedef void (*XtDestructor)(
  270. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  271.     XtAppContext    /* app */,
  272.     XrmValue*        /* to */,
  273.     XtPointer         /* converter_data */,
  274.     XrmValue*        /* args */,
  275.     Cardinal*        /* num_args */
  276. #endif
  277. );
  278.  
  279. typedef Opaque XtCacheRef;
  280.  
  281. typedef Opaque XtActionHookId;
  282.  
  283. typedef void (*XtActionHookProc)(
  284. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  285.     Widget        /* w */,
  286.     XtPointer        /* client_data */,
  287.     String        /* action_name */,
  288.     XEvent*        /* event */,
  289.     String*        /* params */,
  290.     Cardinal*        /* num_params */
  291. #endif
  292. );
  293.  
  294. typedef void (*XtKeyProc)(
  295. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  296.     Display*        /* dpy */,
  297. #if NeedWidePrototypes
  298.     /* KeyCode */ int    /* keycode */,
  299. #else
  300.     KeyCode         /* keycode */,
  301. #endif /* NeedWidePrototypes */
  302.     Modifiers        /* modifiers */,
  303.     Modifiers*        /* modifiers_return */,
  304.     KeySym*        /* keysym_return */
  305. #endif
  306. );
  307.  
  308. typedef void (*XtCaseProc)(
  309. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  310.     Display*        /* display */,
  311.     KeySym        /* keysym */,
  312.     KeySym*        /* lower_return */,
  313.     KeySym*        /* upper_return */
  314. #endif
  315. );
  316.  
  317. typedef void (*XtEventHandler)(
  318. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  319.     Widget         /* widget */,
  320.     XtPointer         /* closure */,
  321.     XEvent*        /* event */,
  322.     Boolean*        /* continue_to_dispatch */
  323. #endif
  324. );
  325. typedef unsigned long EventMask;
  326.  
  327. typedef enum _XtListPosition {XtListHead, XtListTail } XtListPosition; /* Added Tag. POHC 91/01/16 */
  328.  
  329. typedef unsigned long    XtInputMask;
  330. #define XtInputNoneMask        0L
  331. #define XtInputReadMask        (1L<<0)
  332. #define XtInputWriteMask    (1L<<1)
  333. #define XtInputExceptMask    (1L<<2)
  334.  
  335. typedef void (*XtTimerCallbackProc)(
  336. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  337.     XtPointer         /* closure */,
  338.     XtIntervalId*    /* id */
  339. #endif
  340. );
  341.  
  342. typedef void (*XtInputCallbackProc)(
  343. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  344.     XtPointer         /* closure */,
  345.     int*        /* source */,
  346.     XtInputId*        /* id */
  347. #endif
  348. );
  349.  
  350. typedef struct _Arg { /* Added Tag. POHC 91/01/16 */
  351.     String    name;
  352.     XtArgVal    value;
  353. } Arg, *ArgList;
  354.  
  355. typedef XtPointer    XtVarArgsList;
  356.  
  357. typedef void (*XtCallbackProc)(
  358. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  359.     Widget         /* widget */,
  360.     XtPointer         /* closure */,    /* data the application registered */
  361.     XtPointer         /* call_data */    /* callback specific data */
  362. #endif
  363. );
  364.  
  365. typedef struct _XtCallbackRec {
  366.     XtCallbackProc  callback;
  367.     XtPointer        closure;
  368. } XtCallbackRec, *XtCallbackList;
  369.  
  370. typedef enum _XtCallbackStatus { /* Added Tag. POHC 91/01/16 */
  371.     XtCallbackNoList,
  372.     XtCallbackHasNone,
  373.     XtCallbackHasSome
  374. } XtCallbackStatus;
  375.  
  376. typedef enum  _XtGeometryResult { /* Added Tag. POHC 91/01/16 */
  377.     XtGeometryYes,      /* Request accepted. */
  378.     XtGeometryNo,      /* Request denied. */
  379.     XtGeometryAlmost,      /* Request denied, but willing to take replyBox. */
  380.     XtGeometryDone      /* Request accepted and done. */
  381. } XtGeometryResult;
  382.  
  383. typedef enum _XtGrabKind {XtGrabNone, XtGrabNonexclusive, XtGrabExclusive} XtGrabKind; /* Added Tag. POHC 91/01/16 */
  384.  
  385. typedef struct _XtPopdownIDRec { /* Added Tag. POHC 91/01/16 */
  386.     Widget  shell_widget;
  387.     Widget  enable_widget;
  388. } XtPopdownIDRec, *XtPopdownID;
  389.  
  390. typedef struct _XtResource {
  391.     String    resource_name;    /* Resource name                */
  392.     String    resource_class;    /* Resource class                */
  393.     String    resource_type;    /* Representation type desired            */
  394.     Cardinal    resource_size;    /* Size in bytes of representation        */
  395.     XrmQuark    resource_offset;/* Offset from base to put resource value   */
  396. /*  ^^^^^^^^ was Cardinal. POHC 91/04/04
  397.     See compatible structure XrmResourceList in IntrinsicP.h  */
  398.     String    default_type;    /* representation type of specified default */
  399.     XtPointer    default_addr;    /* Address of default resource            */
  400. } XtResource, *XtResourceList;
  401.  
  402. typedef void (*XtResourceDefaultProc)(
  403. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  404.     Widget    /* widget */,
  405.     XrmQuark    /* offset */, /* Was int. POHC 91/04/04 */
  406.     XrmValue*    /* value */
  407. #endif
  408. );
  409.  
  410. typedef void (*XtErrorMsgHandler)(
  411. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  412.     String         /* name */,
  413.     String        /* type */,
  414.     String        /* class */,
  415.     String        /* defaultp */,
  416.     String*        /* params */,
  417.     Cardinal*        /* num_params */
  418. #endif
  419. );
  420.  
  421. typedef void (*XtErrorHandler)(
  422. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  423.   String        /* msg */
  424. #endif
  425. );
  426.  
  427. typedef Boolean (*XtWorkProc)(
  428. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  429.     XtPointer         /* closure */    /* data the application registered */
  430. #endif
  431. );
  432.  
  433. typedef struct _SubstitutionRec { /* Added Tag. POHC 91/01/16 */
  434.     char match;
  435.     String substitution;
  436. } SubstitutionRec, *Substitution;
  437.  
  438. typedef Boolean (*XtFilePredicate)(
  439. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  440.     String /* filename */ 
  441. #endif
  442. );
  443.  
  444. typedef XtPointer XtRequestId;
  445.  
  446. /*
  447.  * Routine to get the value of a selection as a given type.  Returns
  448.  * TRUE if it successfully got the value as requested, FALSE otherwise.  
  449.  * selection is the atom describing the type of selection (e.g. 
  450.  * primary or secondary). value is set to the pointer of the converted 
  451.  * value, with length elements of data, each of size indicated by format.
  452.  * (This pointer will be freed using XtFree when the selection has
  453.  *  been delivered to the requestor.)  target is
  454.  * the type that the conversion should use if possible; type is returned as
  455.  * the actual type returned.  Format should be either 8, 16, or 32, and
  456.  * specifies the word size of the selection, so that Xlib and the server can
  457.  * convert it between different machine types. */
  458.  
  459. typedef Boolean (*XtConvertSelectionProc)(
  460. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  461.     Widget         /* widget */,
  462.     Atom*        /* selection */,
  463.     Atom*        /* target */,
  464.     Atom*        /* type_return */,
  465.     XtPointer*        /* value_return */,
  466.     unsigned long*    /* length_return */,
  467.     int*        /* format_return */
  468. #endif
  469. );
  470.  
  471. /*
  472.  * Routine to inform a widget that it no longer owns the given selection.
  473.  */
  474.  
  475. typedef void (*XtLoseSelectionProc)(
  476. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  477.     Widget         /* widget */,
  478.     Atom*        /* selection */
  479. #endif
  480. );
  481.  
  482. /*
  483.  * Routine to inform the selection owner when a selection requestor
  484.  * has successfully retrieved the selection value.
  485.  */
  486.  
  487. typedef void (*XtSelectionDoneProc)(
  488. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  489.     Widget         /* widget */,
  490.     Atom*        /* selection */,
  491.     Atom*        /* target */
  492. #endif
  493. );
  494.  
  495.  
  496. /*
  497.  * Routine to call back when a requested value has been obtained for a
  498.  *  selection.
  499.  */
  500.  
  501. typedef void (*XtSelectionCallbackProc)(
  502. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/05 */
  503.     Widget         /* widget */,
  504.     XtPointer         /* closure */,
  505.     Atom*        /* selection */,
  506.     Atom*        /* type */,
  507.     XtPointer         /* value */,
  508.     unsigned long*    /* length */,
  509.     int*        /* format */
  510. #endif
  511. );
  512.  
  513. typedef void (*XtLoseSelectionIncrProc)(
  514. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  515.     Widget         /* widget */,
  516.     Atom*        /* selection */,
  517.     XtPointer         /* client_data */
  518. #endif
  519. );
  520.  
  521. typedef void (*XtSelectionDoneIncrProc)(
  522. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  523.     Widget         /* widget */,
  524.     Atom*        /* selection */,
  525.     Atom*        /* target */,
  526.     XtRequestId*    /* receiver_id */,
  527.     XtPointer         /* client_data */
  528. #endif
  529. );
  530.  
  531. typedef Boolean (*XtConvertSelectionIncrProc)(
  532. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  533.     Widget         /* widget */,
  534.     Atom*        /* selection */,
  535.     Atom*        /* target */,
  536.     Atom*        /* type */,
  537.     XtPointer*        /* value */,
  538.     unsigned long*    /* length */,
  539.     int*        /* format */,
  540.     unsigned long*    /* max_length */,
  541.     XtPointer         /* client_data */,
  542.     XtRequestId*    /* receiver_id */
  543. #endif
  544. );
  545.  
  546. typedef void (*XtCancelConvertSelectionProc)(
  547. #if (NeedFunctionPrototypes || NeedFunctionPtrPrototypes) /* POHC 91/04/15 */
  548.     Widget         /* widget */,
  549.     Atom*        /* selection */,
  550.     Atom*        /* target */,
  551.     XtRequestId*    /* receiver_id */,
  552.     XtPointer         /* client_data */
  553. #endif
  554. );
  555.  
  556. /***************************************************************
  557.  *
  558.  * Exported Interfaces
  559.  *
  560.  ****************************************************************/
  561.  
  562. #ifdef __cplusplus            /* do not leave open across includes */
  563. extern "C" {                /* for C++ V2.0 */
  564. #endif
  565.  
  566. extern Boolean XtConvertAndStore(
  567. #if NeedFunctionPrototypes
  568.     Widget         /* widget */,
  569.     CONST String     /* from_type */,
  570.     XrmValue*        /* from */,
  571.     CONST String     /* to_type */,
  572.     XrmValue*        /* to_in_out */
  573. #endif
  574. );
  575.  
  576. extern Boolean XtCallConverter(
  577. #if NeedFunctionPrototypes
  578.     Display*        /* dpy */,
  579.     XtTypeConverter     /* converter */,
  580.     XrmValuePtr     /* args */,
  581.     Cardinal         /* num_args */,
  582.     XrmValuePtr     /* from */,
  583.     XrmValue*        /* to_return */,
  584.     XtCacheRef*        /* cache_ref_return */
  585. #endif
  586. );
  587.  
  588. extern Boolean XtDispatchEvent(
  589. #if NeedFunctionPrototypes
  590.     XEvent*         /* event */
  591. #endif
  592. );
  593.  
  594. extern Boolean XtCallAcceptFocus(
  595. #if NeedFunctionPrototypes
  596.     Widget         /* widget */,
  597.     Time*        /* t */
  598. #endif
  599. );
  600.  
  601. extern Boolean XtPeekEvent(
  602. #if NeedFunctionPrototypes
  603.     XEvent*        /* event */
  604. #endif
  605. );
  606.  
  607. extern Boolean XtAppPeekEvent(
  608. #if NeedFunctionPrototypes
  609.     XtAppContext     /* appContext */,
  610.     XEvent*        /* event */
  611. #endif
  612. );
  613.  
  614. extern Boolean XtIsSubclass(
  615. #if NeedFunctionPrototypes
  616.     Widget         /* widget */,
  617.     WidgetClass     /* widgetClass */
  618. #endif
  619. );
  620.  
  621. extern Boolean XtIsObject(
  622. #if NeedFunctionPrototypes
  623.     Widget         /* object */
  624. #endif
  625. );
  626.  
  627. extern Boolean _XtCheckSubclassFlag( /* implementation-private */
  628. #if NeedFunctionPrototypes
  629.     Widget        /* object */,
  630. #if NeedWidePrototypes
  631.     /* XtEnum */ int    /* type_flag */
  632. #else
  633.     XtEnum        /* type_flag */
  634. #endif /* NeedWidePrototypes */
  635. #endif
  636. );
  637.  
  638. extern Boolean _XtIsSubclassOf( /* implementation-private */
  639. #if NeedFunctionPrototypes
  640.     Widget        /* object */,
  641.     WidgetClass        /* widget_class */,
  642.     WidgetClass        /* flag_class */,
  643. #if NeedWidePrototypes
  644.     /* XtEnum */ int    /* type_flag */
  645. #else
  646.     XtEnum        /* type_flag */
  647. #endif /* NeedWidePrototypes */
  648. #endif
  649. );
  650.  
  651. extern Boolean XtIsManaged(
  652. #if NeedFunctionPrototypes
  653.     Widget         /* rectobj */
  654. #endif
  655. );
  656.  
  657. extern Boolean XtIsRealized(
  658. #if NeedFunctionPrototypes
  659.     Widget         /* widget */
  660. #endif
  661. );
  662.  
  663. extern Boolean XtIsSensitive(
  664. #if NeedFunctionPrototypes
  665.     Widget         /* widget */
  666. #endif
  667. );
  668.  
  669. /*
  670.  * Set the given widget to own the selection.  The convertProc should
  671.  * be called when someone wants the current value of the selection. If it
  672.  * is not NULL, the
  673.  * losesSelection gets called whenever the window no longer owns the selection
  674.  * (because someone else took it). If it is not NULL, the doneProc gets
  675.  * called when the widget has provided the current value of the selection
  676.  * to a requestor and the requestor has indicated that it has succeeded
  677.  * in reading it by deleting the property.
  678.  */
  679.  
  680. extern Boolean XtOwnSelection(
  681. #if NeedFunctionPrototypes
  682.     Widget         /* widget */,
  683.     Atom         /* selection */,
  684.     Time         /* time */,
  685.     XtConvertSelectionProc /* convert */,
  686.     XtLoseSelectionProc    /* lose */,
  687.     XtSelectionDoneProc /* done */
  688. #endif
  689. );
  690.  
  691. /* incremental selection interface */
  692.  
  693. extern Boolean XtOwnSelectionIncremental(
  694. #if NeedFunctionPrototypes
  695.     Widget         /* widget */,
  696.     Atom         /* selection */,
  697.     Time         /* time */,
  698.     XtConvertSelectionIncrProc    /* convert_callback */,
  699.     XtLoseSelectionIncrProc    /* lose_callback */,
  700.     XtSelectionDoneIncrProc    /* done_callback */,
  701.     XtCancelConvertSelectionProc /* cancel_callback */,
  702.     XtPointer         /* client_data */
  703. #endif
  704. );
  705.  
  706. extern XtGeometryResult XtMakeResizeRequest(
  707. #if NeedFunctionPrototypes
  708.     Widget         /* widget */,
  709. #if NeedWidePrototypes
  710.         /* Dimension */ int /* width */,
  711.      /*    Dimension  */ int /* height */,
  712. #else
  713.     Dimension        /* width */,
  714.     Dimension         /* height */,
  715. #endif /* NeedWidePrototypes */
  716.     Dimension*        /* replyWidth */,
  717.     Dimension*        /* replyHeight */
  718. #endif
  719. );
  720.  
  721. extern void XtTranslateCoords(
  722. #if NeedFunctionPrototypes
  723.     Widget         /* widget */,
  724. #if NeedWidePrototypes
  725.     /* Position */ int    /* x */,
  726.     /* Position    */ int    /* y */,
  727. #else
  728.     Position        /* x */,
  729.     Position        /* y */,
  730. #endif /* NeedWidePrototypes */
  731.     Position*        /* rootx_return */,
  732.     Position*        /* rooty_return */
  733. #endif
  734. );
  735.  
  736. extern KeySym* XtGetKeysymTable(
  737. #if NeedFunctionPrototypes
  738.     Display*        /* dpy */,
  739.     KeyCode*        /* min_keycode_return */,
  740.     int*        /* keysyms_per_keycode_return */
  741. #endif
  742. );
  743.  
  744. extern void XtKeysymToKeycodeList(
  745. #if NeedFunctionPrototypes
  746.     Display*        /* dpy */,
  747.     KeySym         /* keysym */,
  748.     KeyCode**        /* keycodes_return */,
  749.     Cardinal*        /* keycount_return */
  750. #endif
  751. );
  752.  
  753. /* %%% Caution: don't declare any functions past this point that
  754.  * return one of the following types or take a pointer to one of
  755.  * the following types.
  756.  */
  757.  
  758. #if NeedWidePrototypes
  759. #define Boolean        int
  760. #define Dimension    int
  761. #define KeyCode        int
  762. #define Position    int
  763. #define XtEnum        int
  764. #endif /* NeedWidePrototypes */
  765.  
  766. extern void XtStringConversionWarning(
  767. #if NeedFunctionPrototypes
  768.     CONST String    /* from */,    /* String attempted to convert.        */
  769.     CONST String    /* toType */    /* Type attempted to convert it to. */
  770. #endif
  771. );
  772.  
  773. extern void XtDisplayStringConversionWarning(
  774. #if NeedFunctionPrototypes
  775.     Display*         /* dpy */,
  776.     CONST String    /* from */,    /* String attempted to convert.        */
  777.     CONST String    /* toType */    /* Type attempted to convert it to. */
  778. #endif
  779. );
  780.  
  781. #if defined(__STDC__)
  782. /* externalref */ extern XtConvertArgRec const colorConvertArgs[]; /* POHC 91/03/19 */
  783. /* externalref */ extern XtConvertArgRec const screenConvertArg[];
  784. #else
  785. externalref XtConvertArgRec colorConvertArgs[];
  786. externalref XtConvertArgRec screenConvertArg[];
  787. #endif
  788.  
  789. extern void XtAppAddConverter( /* obsolete */
  790. #if NeedFunctionPrototypes
  791.     XtAppContext    /* app */,
  792.     CONST String    /* from_type */,
  793.     CONST String    /* to_type */,
  794.     XtConverter     /* converter */,
  795.     XtConvertArgList    /* convert_args */,
  796.     Cardinal         /* num_args */
  797. #endif
  798. );
  799.  
  800. extern void XtAddConverter( /* obsolete */
  801. #if NeedFunctionPrototypes
  802.     CONST String    /* from_type */,
  803.     CONST String     /* to_type */,
  804.     XtConverter     /* converter */,
  805.     XtConvertArgList     /* convert_args */,
  806.     Cardinal         /* num_args */
  807. #endif
  808. );
  809.  
  810. extern void XtSetTypeConverter(
  811. #if NeedFunctionPrototypes
  812.     CONST String     /* from_type */,
  813.     CONST String     /* to_type */,
  814.     XtTypeConverter     /* converter */,
  815.     XtConvertArgList     /* convert_args */,
  816.     Cardinal         /* num_args */,
  817.     XtCacheType     /* cache_type */,
  818.     XtDestructor     /* destructor */
  819. #endif
  820. );
  821.  
  822. extern void XtAppSetTypeConverter(
  823. #if NeedFunctionPrototypes
  824.     XtAppContext     /* app_context */,
  825.     CONST String     /* from_type */,
  826.     CONST String     /* to_type */,
  827.     XtTypeConverter     /* converter */,
  828.     XtConvertArgList     /* convert_args */,
  829.     Cardinal         /* num_args */,
  830.     XtCacheType     /* cache_type */,
  831.     XtDestructor     /* destructor */
  832. #endif
  833. );
  834.  
  835. extern void XtConvert(
  836. #if NeedFunctionPrototypes
  837.     Widget         /* widget */,
  838.     CONST String     /* from_type */,
  839.     XrmValue*        /* from */,
  840.     CONST String     /* to_type */,
  841.     XrmValue*        /* to_return */
  842. #endif
  843. );
  844.  
  845. extern void XtDirectConvert(
  846. #if NeedFunctionPrototypes
  847.     XtConverter     /* converter */,
  848.     XrmValuePtr     /* args */,
  849.     Cardinal         /* num_args */,
  850.     XrmValuePtr     /* from */,
  851.     XrmValue*        /* to_return */
  852. #endif
  853. );
  854.  
  855. /****************************************************************
  856.  *
  857.  * Translation Management
  858.  *
  859.  ****************************************************************/
  860.  
  861. extern XtTranslations XtParseTranslationTable(
  862. #if NeedFunctionPrototypes
  863.     CONST String    /* source */
  864. #endif
  865. );
  866.  
  867. extern XtAccelerators XtParseAcceleratorTable(
  868. #if NeedFunctionPrototypes
  869.     CONST String    /* source */
  870. #endif
  871. );
  872.  
  873. extern void XtOverrideTranslations(
  874. #if NeedFunctionPrototypes
  875.     Widget         /* widget */,
  876.     XtTranslations     /* new */
  877. #endif
  878. );
  879.  
  880. extern void XtAugmentTranslations(
  881. #if NeedFunctionPrototypes
  882.     Widget         /* widget */,
  883.     XtTranslations     /* new */
  884. #endif
  885. );
  886.  
  887. extern void XtInstallAccelerators(
  888. #if NeedFunctionPrototypes
  889.     Widget         /* destination */,
  890.     Widget        /* source */
  891. #endif
  892. );
  893.  
  894. extern void XtInstallAllAccelerators(
  895. #if NeedFunctionPrototypes
  896.     Widget         /* destination */,
  897.     Widget        /* source */
  898. #endif
  899. );
  900.  
  901. extern void XtUninstallTranslations(
  902. #if NeedFunctionPrototypes
  903.     Widget         /* widget */
  904. #endif
  905. );
  906.  
  907. extern void XtAppAddActions(
  908. #if NeedFunctionPrototypes
  909.     XtAppContext     /* app */,
  910.     XtActionList     /* actions */,
  911.     Cardinal         /* num_actions */
  912. #endif
  913. );
  914.  
  915. extern void XtAddActions(
  916. #if NeedFunctionPrototypes
  917.     XtActionList     /* actions */,
  918.     Cardinal         /* num_actions */
  919. #endif
  920. );
  921.  
  922. extern XtActionHookId XtAppAddActionHook(
  923. #if NeedFunctionPrototypes
  924.     XtAppContext     /* app */,
  925.     XtActionHookProc     /* proc */,
  926.     XtPointer         /* client_data */
  927. #endif
  928. );
  929.  
  930. extern void XtRemoveActionHook(
  931. #if NeedFunctionPrototypes
  932.     XtActionHookId     /* id */
  933. #endif
  934. );
  935.  
  936. extern void XtCallActionProc(
  937. #if NeedFunctionPrototypes
  938.     Widget        /* widget */,
  939.     CONST String    /* action */,
  940.     XEvent*        /* event */,
  941.     String*        /* params */,
  942.     Cardinal        /* num_params */
  943. #endif
  944. );
  945.  
  946. extern void XtRegisterGrabAction(
  947. #if NeedFunctionPrototypes
  948.     XtActionProc     /* action_proc */,
  949.     Boolean         /* owner_events */,
  950.     unsigned int     /* event_mask */,
  951.     int            /* pointer_mode */,
  952.     int             /* keyboard_mode */
  953. #endif
  954. );
  955.  
  956. extern void XtSetMultiClickTime(
  957. #if NeedFunctionPrototypes
  958.     Display*        /* dpy */,
  959.     int         /* milliseconds */
  960. #endif
  961. );
  962.  
  963. extern int XtGetMultiClickTime(
  964. #if NeedFunctionPrototypes
  965.     Display*        /* dpy */
  966. #endif
  967. );
  968.  
  969. extern KeySym XtGetActionKeysym(
  970. #if NeedFunctionPrototypes
  971.     XEvent*        /* event */,
  972.     Modifiers*        /* modifiers_return */
  973. #endif
  974. );
  975.  
  976. /***************************************************************
  977.  *
  978.  * Keycode and Keysym procedures for translation management
  979.  *
  980.  ****************************************************************/
  981.  
  982. extern void XtTranslateKeycode(
  983. #if NeedFunctionPrototypes
  984.     Display*        /* dpy */,
  985.     KeyCode         /* keycode */,
  986.     Modifiers         /* modifiers */,
  987.     Modifiers*        /* modifiers_return */,
  988.     KeySym*        /* keysym_return */
  989. #endif
  990. );
  991.  
  992. extern void XtTranslateKey(
  993. #if NeedFunctionPrototypes
  994.     Display*        /* dpy */,
  995.     KeyCode        /* keycode */,
  996.     Modifiers        /* modifiers */,
  997.     Modifiers*        /* modifiers_return */,
  998.     KeySym*        /* keysym_return */
  999. #endif
  1000. );
  1001.  
  1002. extern void XtSetKeyTranslator(
  1003. #if NeedFunctionPrototypes
  1004.     Display*        /* dpy */,
  1005.     XtKeyProc         /* proc */
  1006. #endif
  1007. );
  1008.  
  1009. extern void XtRegisterCaseConverter(
  1010. #if NeedFunctionPrototypes
  1011.     Display*        /* dpy */,
  1012.     XtCaseProc         /* proc */,
  1013.     KeySym         /* start */,
  1014.     KeySym         /* stop */
  1015. #endif
  1016. );
  1017.  
  1018. extern void XtConvertCase(
  1019. #if NeedFunctionPrototypes
  1020.     Display*        /* dpy */,
  1021.     KeySym         /* keysym */,
  1022.     KeySym*        /* lower_return */,
  1023.     KeySym*        /* upper_return */
  1024. #endif
  1025. );
  1026.  
  1027. /****************************************************************
  1028.  *
  1029.  * Event Management
  1030.  *
  1031.  ****************************************************************/
  1032.  
  1033. /* XtAllEvents is valid only for XtRemoveEventHandler and
  1034.  * XtRemoveRawEventHandler; don't use it to select events!
  1035.  */
  1036. #define XtAllEvents ((EventMask) -1L)
  1037.  
  1038. extern void XtInsertEventHandler(
  1039. #if NeedFunctionPrototypes
  1040.     Widget         /* widget */,
  1041.     EventMask         /* eventMask */,
  1042.     Boolean         /* nonmaskable */,
  1043.     XtEventHandler     /* proc */,
  1044.     XtPointer         /* closure */,
  1045.     XtListPosition     /* position */
  1046. #endif
  1047. );
  1048.  
  1049. extern void XtInsertRawEventHandler(
  1050. #if NeedFunctionPrototypes
  1051.     Widget         /* widget */,
  1052.     EventMask         /* eventMask */,
  1053.     Boolean         /* nonmaskable */,
  1054.     XtEventHandler     /* proc */,
  1055.     XtPointer         /* closure */,
  1056.     XtListPosition     /* position */
  1057. #endif
  1058. );
  1059.  
  1060. extern void XtAddEventHandler(
  1061. #if NeedFunctionPrototypes
  1062.     Widget         /* widget */,
  1063.     EventMask         /* eventMask */,
  1064.     Boolean         /* nonmaskable */,
  1065.     XtEventHandler     /* proc */,
  1066.     XtPointer         /* closure */
  1067. #endif
  1068. );
  1069.  
  1070. extern void XtRemoveEventHandler(
  1071. #if NeedFunctionPrototypes
  1072.     Widget         /* widget */,
  1073.     EventMask         /* eventMask */,
  1074.     Boolean         /* nonmaskable */,
  1075.     XtEventHandler     /* proc */,
  1076.     XtPointer         /* closure */
  1077. #endif
  1078. );
  1079.  
  1080. extern void XtAddRawEventHandler(
  1081. #if NeedFunctionPrototypes
  1082.     Widget         /* widget */,
  1083.     EventMask         /* eventMask */,
  1084.     Boolean         /* nonmaskable */,
  1085.     XtEventHandler     /* proc */,
  1086.     XtPointer         /* closure */
  1087. #endif
  1088. );
  1089.  
  1090. extern void XtRemoveRawEventHandler(
  1091. #if NeedFunctionPrototypes
  1092.     Widget         /* widget */,
  1093.     EventMask         /* eventMask */,
  1094.     Boolean         /* nonmaskable */,
  1095.     XtEventHandler     /* proc */,
  1096.     XtPointer         /* closure */
  1097. #endif
  1098. );
  1099.  
  1100. extern void XtInsertEventHandler(
  1101. #if NeedFunctionPrototypes
  1102.     Widget         /* widget */,
  1103.     EventMask         /* eventMask */,
  1104.     Boolean         /* nonmaskable */,
  1105.     XtEventHandler     /* proc */,
  1106.     XtPointer         /* closure */,
  1107.     XtListPosition     /* position */
  1108. #endif
  1109. );
  1110.  
  1111. extern void XtInsertRawEventHandler(
  1112. #if NeedFunctionPrototypes
  1113.     Widget         /* widget */,
  1114.     EventMask         /* eventMask */,
  1115.     Boolean         /* nonmaskable */,
  1116.     XtEventHandler     /* proc */,
  1117.     XtPointer         /* closure */,
  1118.     XtListPosition     /* position */
  1119. #endif
  1120. );
  1121.  
  1122. extern EventMask XtBuildEventMask(
  1123. #if NeedFunctionPrototypes
  1124.     Widget         /* widget */
  1125. #endif
  1126. );
  1127.  
  1128. extern void XtAddGrab(
  1129. #if NeedFunctionPrototypes
  1130.     Widget         /* widget */,
  1131.     Boolean         /* exclusive */,
  1132.     Boolean         /* spring_loaded */
  1133. #endif
  1134. );
  1135.  
  1136. extern void XtRemoveGrab(
  1137. #if NeedFunctionPrototypes
  1138.     Widget         /* widget */
  1139. #endif
  1140. );
  1141.  
  1142. extern void XtProcessEvent(
  1143. #if NeedFunctionPrototypes
  1144.     XtInputMask         /* mask */
  1145. #endif
  1146. );
  1147.  
  1148. extern void XtAppProcessEvent(
  1149. #if NeedFunctionPrototypes
  1150.     XtAppContext         /* app */,
  1151.     XtInputMask         /* mask */
  1152. #endif
  1153. );
  1154.  
  1155. extern void XtMainLoop(
  1156. #if NeedFunctionPrototypes
  1157.     void
  1158. #endif
  1159. );
  1160.  
  1161.  
  1162. extern void XtAppMainLoop(
  1163. #if NeedFunctionPrototypes
  1164.     XtAppContext         /* app */
  1165. #endif
  1166. );
  1167.  
  1168. extern void XtAddExposureToRegion(
  1169. #if NeedFunctionPrototypes
  1170.     XEvent*        /* event */,
  1171.     Region         /* region */
  1172. #endif
  1173. );
  1174.  
  1175. extern void XtSetKeyboardFocus(
  1176. #if NeedFunctionPrototypes
  1177.     Widget        /* subtree */,
  1178.     Widget         /* descendent */
  1179. #endif
  1180. );
  1181.  
  1182. extern Time XtLastTimestampProcessed(
  1183. #if NeedFunctionPrototypes
  1184.     Display*        /* dpy */
  1185. #endif
  1186. );
  1187.  
  1188. /****************************************************************
  1189.  *
  1190.  * Event Gathering Routines
  1191.  *
  1192.  ****************************************************************/
  1193.  
  1194.  
  1195. extern XtIntervalId XtAddTimeOut(
  1196. #if NeedFunctionPrototypes
  1197.     unsigned long     /* interval */,
  1198.     XtTimerCallbackProc /* proc */,
  1199.     XtPointer         /* closure */
  1200. #endif
  1201. );
  1202.  
  1203. extern XtIntervalId XtAppAddTimeOut(
  1204. #if NeedFunctionPrototypes
  1205.     XtAppContext     /* app */,
  1206.     unsigned long     /* interval */,
  1207.     XtTimerCallbackProc /* proc */,
  1208.     XtPointer         /* closure */
  1209. #endif
  1210. );
  1211.  
  1212. extern void XtRemoveTimeOut(
  1213. #if NeedFunctionPrototypes
  1214.     XtIntervalId     /* timer */
  1215. #endif
  1216. );
  1217.  
  1218. extern XtInputId XtAddInput(
  1219. #if NeedFunctionPrototypes
  1220.     int         /* source */,
  1221.     XtPointer         /* condition */,
  1222.     XtInputCallbackProc /* proc */,
  1223.     XtPointer         /* closure */
  1224. #endif
  1225. );
  1226.  
  1227. extern XtInputId XtAppAddInput(
  1228. #if NeedFunctionPrototypes
  1229.     XtAppContext           /* app */,
  1230.     int         /* source */,
  1231.     XtPointer         /* condition */,
  1232.     XtInputCallbackProc /* proc */,
  1233.     XtPointer         /* closure */
  1234. #endif
  1235. );
  1236.  
  1237. extern void XtRemoveInput(
  1238. #if NeedFunctionPrototypes
  1239.     XtInputId         /* id */
  1240. #endif
  1241. );
  1242.  
  1243. extern void XtNextEvent(
  1244. #if NeedFunctionPrototypes
  1245.     XEvent*         /* event */
  1246. #endif
  1247. );
  1248.  
  1249. extern void XtAppNextEvent(
  1250. #if NeedFunctionPrototypes
  1251.     XtAppContext     /* appContext */,
  1252.     XEvent*        /* event */
  1253. #endif
  1254. );
  1255.  
  1256. #define XtIMXEvent        1
  1257. #define XtIMTimer        2
  1258. #define XtIMAlternateInput    4
  1259. #define XtIMAll (XtIMXEvent | XtIMTimer | XtIMAlternateInput)
  1260.  
  1261. extern XtInputMask XtPending(
  1262. #if NeedFunctionPrototypes
  1263.     void
  1264. #endif
  1265. );
  1266.  
  1267. extern XtInputMask XtAppPending(
  1268. #if NeedFunctionPrototypes
  1269.     XtAppContext     /* appContext */
  1270. #endif
  1271. );
  1272.  
  1273. /****************************************************************
  1274.  *
  1275.  * Random utility routines
  1276.  *
  1277.  ****************************************************************/
  1278.  
  1279. #define XtIsRectObj(object)    (_XtCheckSubclassFlag(object, (XtEnum)0x02))
  1280. #define XtIsWidget(object)    (_XtCheckSubclassFlag(object, (XtEnum)0x04))
  1281. #define XtIsComposite(widget)    (_XtCheckSubclassFlag(widget, (XtEnum)0x08))
  1282. #define XtIsConstraint(widget)    (_XtCheckSubclassFlag(widget, (XtEnum)0x10))
  1283. #define XtIsShell(widget)    (_XtCheckSubclassFlag(widget, (XtEnum)0x20))
  1284. #define XtIsOverrideShell(widget) \
  1285.     (_XtIsSubclassOf(widget, (WidgetClass)overrideShellWidgetClass, \
  1286.              (WidgetClass)shellWidgetClass, (XtEnum)0x20))
  1287. #define XtIsWMShell(widget)    (_XtCheckSubclassFlag(widget, (XtEnum)0x40))
  1288. #define XtIsVendorShell(widget)    \
  1289.     (_XtIsSubclassOf(widget, (WidgetClass)vendorShellWidgetClass, \
  1290.              (WidgetClass)wmShellWidgetClass, (XtEnum)0x40))
  1291. #define XtIsTransientShell(widget) \
  1292.     (_XtIsSubclassOf(widget, (WidgetClass)transientShellWidgetClass, \
  1293.              (WidgetClass)wmShellWidgetClass, (XtEnum)0x40))
  1294. #define XtIsTopLevelShell(widget) (_XtCheckSubclassFlag(widget, (XtEnum)0x80))
  1295. #define XtIsApplicationShell(widget) \
  1296.     (_XtIsSubclassOf(widget, (WidgetClass)applicationShellWidgetClass, \
  1297.              (WidgetClass)topLevelShellWidgetClass, (XtEnum)0x80))
  1298.  
  1299. extern void XtRealizeWidget(
  1300. #if NeedFunctionPrototypes
  1301.     Widget         /* widget */
  1302. #endif
  1303. );
  1304.  
  1305. void XtUnrealizeWidget(
  1306. #if NeedFunctionPrototypes
  1307.     Widget         /* widget */
  1308. #endif
  1309. );
  1310.  
  1311. extern void XtDestroyWidget(
  1312. #if NeedFunctionPrototypes
  1313.     Widget         /* widget */
  1314. #endif
  1315. );
  1316.  
  1317. extern void XtSetSensitive(
  1318. #if NeedFunctionPrototypes
  1319.     Widget         /* widget */,
  1320.     Boolean         /* sensitive */
  1321. #endif
  1322. );
  1323.  
  1324. extern void XtSetMappedWhenManaged(
  1325. #if NeedFunctionPrototypes
  1326.     Widget         /* widget */,
  1327.     Boolean         /* mappedWhenManaged */
  1328. #endif
  1329. );
  1330.  
  1331. extern Widget XtNameToWidget(
  1332. #if NeedFunctionPrototypes
  1333.     Widget         /* root */,
  1334.     CONST String    /* name */
  1335. #endif
  1336. );
  1337.  
  1338. extern Widget XtWindowToWidget(
  1339. #if NeedFunctionPrototypes
  1340.     Display*        /* display */,
  1341.     Window         /* window */
  1342. #endif
  1343. );
  1344.  
  1345. /***************************************************************
  1346.  *
  1347.  * Arg lists
  1348.  *
  1349.  ****************************************************************/
  1350.  
  1351.  
  1352. #define XtSetArg(arg, n, d) \
  1353.     ((void)( (arg).name = (n), (arg).value = (XtArgVal)(d) ))
  1354.  
  1355. extern ArgList XtMergeArgLists(
  1356. #if NeedFunctionPrototypes
  1357.     ArgList         /* args1 */,
  1358.     Cardinal         /* num_args1 */,
  1359.     ArgList         /* args2 */,
  1360.     Cardinal         /* num_args2 */
  1361. #endif
  1362. );
  1363.  
  1364. /***************************************************************
  1365.  *
  1366.  * Vararg lists
  1367.  *
  1368.  ****************************************************************/
  1369.  
  1370. #define XtVaNestedList  "XtVaNestedList"
  1371. #define XtVaTypedArg    "XtVaTypedArg"
  1372.  
  1373. extern XtVarArgsList XtVaCreateArgsList(
  1374. #if NeedVarargsPrototypes
  1375.     XtPointer        /*unused*/, ...
  1376. #endif
  1377. );
  1378.  
  1379. /*************************************************************
  1380.  *
  1381.  * Information routines
  1382.  *
  1383.  ************************************************************/
  1384.  
  1385. #ifndef _XtIntrinsicP_h
  1386.  
  1387. /* We're not included from the private file, so define these */
  1388.  
  1389. extern Display *XtDisplay(
  1390. #if NeedFunctionPrototypes
  1391.     Widget         /* widget */
  1392. #endif
  1393. );
  1394.  
  1395. extern Display *XtDisplayOfObject(
  1396. #if NeedFunctionPrototypes
  1397.     Widget         /* object */
  1398. #endif
  1399. );
  1400.  
  1401. extern Screen *XtScreen(
  1402. #if NeedFunctionPrototypes
  1403.     Widget         /* widget */
  1404. #endif
  1405. );
  1406.  
  1407. extern Screen *XtScreenOfObject(
  1408. #if NeedFunctionPrototypes
  1409.     Widget         /* object */
  1410. #endif
  1411. );
  1412.  
  1413. extern Window XtWindow(
  1414. #if NeedFunctionPrototypes
  1415.     Widget         /* widget */
  1416. #endif
  1417. );
  1418.  
  1419. extern Window XtWindowOfObject(
  1420. #if NeedFunctionPrototypes
  1421.     Widget         /* object */
  1422. #endif
  1423. );
  1424.  
  1425. extern String XtName(
  1426. #if NeedFunctionPrototypes
  1427.     Widget         /* object */
  1428. #endif
  1429. );
  1430.  
  1431. extern WidgetClass XtSuperclass(
  1432. #if NeedFunctionPrototypes
  1433.     Widget         /* object */
  1434. #endif
  1435. );
  1436.  
  1437. extern WidgetClass XtClass(
  1438. #if NeedFunctionPrototypes
  1439.     Widget         /* object */
  1440. #endif
  1441. );
  1442.  
  1443. extern Widget XtParent(
  1444. #if NeedFunctionPrototypes
  1445.     Widget         /* widget */
  1446. #endif
  1447. );
  1448.  
  1449. #endif /*_XtIntrinsicP_h*/
  1450.  
  1451. #define XtMapWidget(widget)    XMapWindow(XtDisplay(widget), XtWindow(widget))
  1452. #define XtUnmapWidget(widget)    \
  1453.         XUnmapWindow(XtDisplay(widget), XtWindow(widget))
  1454.  
  1455. extern void XtAddCallback(
  1456. #if NeedFunctionPrototypes
  1457.     Widget         /* widget */,
  1458.     CONST String     /* callback_name */,
  1459.     XtCallbackProc     /* callback */,
  1460.     XtPointer         /* closure */
  1461. #endif
  1462. );
  1463.  
  1464. extern void XtRemoveCallback(
  1465. #if NeedFunctionPrototypes
  1466.     Widget         /* widget */,
  1467.     CONST String     /* callback_name */,
  1468.     XtCallbackProc     /* callback */,
  1469.     XtPointer         /* closure */
  1470. #endif
  1471. );
  1472.  
  1473. extern void XtAddCallbacks(
  1474. #if NeedFunctionPrototypes
  1475.     Widget         /* widget */,
  1476.     CONST String    /* callback_name */,
  1477.     XtCallbackList     /* callbacks */
  1478. #endif
  1479. );
  1480.  
  1481. extern void XtRemoveCallbacks(
  1482. #if NeedFunctionPrototypes
  1483.     Widget         /* widget */,
  1484.     CONST String     /* callback_name */,
  1485.     XtCallbackList     /* callbacks */
  1486. #endif
  1487. );
  1488.  
  1489. extern void XtRemoveAllCallbacks(
  1490. #if NeedFunctionPrototypes
  1491.     Widget         /* widget */,
  1492.     CONST String     /* callback_name */
  1493. #endif
  1494. );
  1495.  
  1496.  
  1497. extern void XtCallCallbacks(
  1498. #if NeedFunctionPrototypes
  1499.     Widget         /* widget */,
  1500.     CONST String     /* callback_name */,
  1501.     XtPointer         /* call_data */
  1502. #endif
  1503. );
  1504.  
  1505. extern void XtCallCallbackList(
  1506. #if NeedFunctionPrototypes
  1507.     Widget        /* widget */,
  1508.     XtCallbackList     /* callbacks */,
  1509.     XtPointer         /* call_data */
  1510. #endif
  1511. );
  1512.  
  1513. extern XtCallbackStatus XtHasCallbacks(
  1514. #if NeedFunctionPrototypes
  1515.     Widget         /* widget */,
  1516.     CONST String     /* callback_name */
  1517. #endif
  1518. );
  1519.  
  1520. /****************************************************************
  1521.  *
  1522.  * Geometry Management
  1523.  *
  1524.  ****************************************************************/
  1525.  
  1526.  
  1527. extern XtGeometryResult XtMakeGeometryRequest(
  1528. #if NeedFunctionPrototypes
  1529.     Widget         /* widget */,
  1530.     XtWidgetGeometry*    /* request */,
  1531.     XtWidgetGeometry*    /* reply_return */
  1532. #endif
  1533. );
  1534.  
  1535. extern XtGeometryResult XtQueryGeometry(
  1536. #if NeedFunctionPrototypes
  1537.     Widget         /* widget */,
  1538.     XtWidgetGeometry*    /* intended */,
  1539.     XtWidgetGeometry*    /* reply_return */
  1540. #endif
  1541. );
  1542.  
  1543. extern Widget XtCreatePopupShell(
  1544. #if NeedFunctionPrototypes
  1545.     CONST String    /* name */,
  1546.     WidgetClass     /* widgetClass */,
  1547.     Widget         /* parent */,
  1548.     ArgList         /* args */,
  1549.     Cardinal         /* num_args */
  1550. #endif
  1551. );
  1552.  
  1553. extern Widget XtVaCreatePopupShell(
  1554. #if NeedVarargsPrototypes
  1555.     CONST String    /* name */,
  1556.     WidgetClass        /* widgetClass */,
  1557.     Widget        /* parent */,
  1558.     ...
  1559. #endif
  1560. );
  1561.  
  1562. extern void XtPopup(
  1563. #if NeedFunctionPrototypes
  1564.     Widget         /* widget */,
  1565.     XtGrabKind         /* grab_kind */
  1566. #endif
  1567. );
  1568.  
  1569. extern void XtPopupSpringLoaded(
  1570. #if NeedFunctionPrototypes
  1571.     Widget         /* widget */
  1572. #endif
  1573. );
  1574.  
  1575. extern void XtCallbackNone(
  1576. #if NeedFunctionPrototypes
  1577.     Widget         /* widget */,
  1578.     XtPointer         /* closure */,
  1579.     XtPointer         /* call_data */
  1580. #endif
  1581. );
  1582.  
  1583. extern void XtCallbackNonexclusive(
  1584. #if NeedFunctionPrototypes
  1585.     Widget         /* widget */,
  1586.     XtPointer         /* closure */,
  1587.     XtPointer         /* call_data */
  1588. #endif
  1589. );
  1590.  
  1591. extern void XtCallbackExclusive(
  1592. #if NeedFunctionPrototypes
  1593.     Widget         /* widget */,
  1594.     XtPointer         /* closure */,
  1595.     XtPointer         /* call_data */
  1596. #endif
  1597. );
  1598.  
  1599. extern void XtPopdown(
  1600. #if NeedFunctionPrototypes
  1601.     Widget         /* widget */
  1602. #endif
  1603. );
  1604.  
  1605. extern void XtCallbackPopdown(
  1606. #if NeedFunctionPrototypes
  1607.     Widget         /* widget */,
  1608.     XtPointer         /* closure */,
  1609.     XtPointer         /* call_data */
  1610. #endif
  1611. );
  1612.  
  1613. extern void XtMenuPopupAction(
  1614. #if NeedFunctionPrototypes
  1615.     Widget         /* widget */,
  1616.     XEvent*        /* event */,
  1617.     String*        /* params */,
  1618.     Cardinal*        /* num_params */
  1619. #endif
  1620. );
  1621.  
  1622. extern Widget XtCreateWidget(
  1623. #if NeedFunctionPrototypes
  1624.     CONST String     /* name */,
  1625.     WidgetClass     /* widget_class */,
  1626.     Widget         /* parent */,
  1627.     ArgList         /* args */,
  1628.     Cardinal         /* num_args */
  1629. #endif
  1630. );
  1631.  
  1632. extern Widget XtCreateManagedWidget(
  1633. #if NeedFunctionPrototypes
  1634.     CONST String     /* name */,
  1635.     WidgetClass     /* widget_class */,
  1636.     Widget         /* parent */,
  1637.     ArgList         /* args */,
  1638.     Cardinal         /* num_args */
  1639. #endif
  1640. );
  1641.  
  1642. extern Widget XtVaCreateWidget(
  1643. #if NeedVarargsPrototypes
  1644.     CONST String    /* name */,
  1645.     WidgetClass        /* widget */,
  1646.     Widget        /* parent */,
  1647.     ...
  1648. #endif
  1649. );
  1650.  
  1651. extern Widget XtVaCreateManagedWidget(
  1652. #if NeedVarargsPrototypes
  1653.     CONST String    /* name */,
  1654.     WidgetClass        /* widget_class */,
  1655.     Widget        /* parent */,
  1656.     ...
  1657. #endif
  1658. );
  1659.  
  1660. extern Widget XtCreateApplicationShell(
  1661. #if NeedFunctionPrototypes
  1662.     CONST String     /* name */,
  1663.     WidgetClass     /* widget_class */,
  1664.     ArgList         /* args */,
  1665.     Cardinal         /* num_args */
  1666. #endif
  1667. );
  1668.  
  1669. extern Widget XtAppCreateShell(
  1670. #if NeedFunctionPrototypes
  1671.     CONST String    /* name */,
  1672.     CONST String    /* class */,
  1673.     WidgetClass     /* widget_class */,
  1674.     Display*        /* display */,
  1675.     ArgList         /* args */,
  1676.     Cardinal         /* num_args */
  1677. #endif
  1678. );
  1679.  
  1680. extern Widget XtVaAppCreateShell(
  1681. #if NeedVarargsPrototypes
  1682.     CONST String    /* name */,
  1683.     CONST String    /* class */,
  1684.     WidgetClass        /* widget_class */,
  1685.     Display*        /* display */,
  1686.     ...
  1687. #endif
  1688. );
  1689.  
  1690. /****************************************************************
  1691.  *
  1692.  * Toolkit initialization
  1693.  *
  1694.  ****************************************************************/
  1695.  
  1696. extern void XtToolkitInitialize(
  1697. #if NeedFunctionPrototypes
  1698.     void
  1699. #endif
  1700. );
  1701.  
  1702. extern void XtDisplayInitialize(
  1703. #if NeedFunctionPrototypes
  1704.     XtAppContext     /* appContext */,
  1705.     Display*        /* dpy */,
  1706.     CONST String    /* name */,
  1707.     CONST String    /* class */,
  1708.     XrmOptionDescRec*     /* options */,
  1709.     Cardinal         /* num_options */,
  1710.     Cardinal*        /* argc */,
  1711.     char**        /* argv */
  1712. #endif
  1713. );
  1714.  
  1715. extern Widget XtAppInitialize(
  1716. #if NeedFunctionPrototypes
  1717.     XtAppContext*    /* app_context_return */,
  1718.     CONST String        /* application_class */,
  1719.     XrmOptionDescList     /* options */,
  1720.     Cardinal         /* num_options */,
  1721.     Cardinal*        /* argc_in_out */,
  1722.     String*        /* argv_in_out */,
  1723.     CONST String*    /* fallback_resources */,
  1724.     ArgList         /* args */,
  1725.     Cardinal         /* num_args */
  1726. #endif
  1727. );
  1728.  
  1729. extern Widget XtVaAppInitialize(
  1730. #if NeedVarargsPrototypes
  1731.     XtAppContext*    /* app_context_return */,
  1732.     CONST String    /* application_class */,
  1733.     XrmOptionDescList    /* options */,
  1734.     Cardinal        /* num_options */,
  1735.     Cardinal*        /* argc_in_out */,
  1736.     String*        /* argv_in_out */,
  1737.     CONST String*    /* fallback_resources */,
  1738.     ...
  1739. #endif
  1740. );
  1741.  
  1742. extern Widget XtInitialize(
  1743. #if NeedFunctionPrototypes
  1744.     CONST String     /* name */,
  1745.     CONST String     /* class */,
  1746.     XrmOptionDescRec*     /* options */,
  1747.     Cardinal         /* num_options */,
  1748.     Cardinal*        /* argc */,
  1749.     char**        /* argv */
  1750. #endif
  1751. );
  1752.  
  1753. extern Display *XtOpenDisplay(
  1754. #if NeedFunctionPrototypes
  1755.     XtAppContext     /* appContext */,
  1756.     CONST String    /* displayName */,
  1757.     CONST String    /* applName */,
  1758.     CONST String    /* className */,
  1759.     XrmOptionDescRec*    /* urlist */,
  1760.     Cardinal         /* num_urs */,
  1761.     Cardinal*        /* argc */,
  1762.     char**        /* argv */
  1763. #endif
  1764. );
  1765.  
  1766. extern XtAppContext XtCreateApplicationContext(
  1767. #if NeedFunctionPrototypes
  1768.     void
  1769. #endif
  1770. );
  1771.  
  1772. extern void XtAppSetFallbackResources(
  1773. #if NeedFunctionPrototypes
  1774.     XtAppContext     /* app_context */,
  1775.     CONST String*     /* specification_list */
  1776. #endif
  1777. );
  1778.  
  1779. extern void XtDestroyApplicationContext(
  1780. #if NeedFunctionPrototypes
  1781.     XtAppContext     /* appContext */
  1782. #endif
  1783. );
  1784.  
  1785. extern void XtInitializeWidgetClass(
  1786. #if NeedFunctionPrototypes
  1787.     WidgetClass     /* widget_class */
  1788. #endif
  1789. );
  1790.  
  1791. extern XtAppContext XtWidgetToApplicationContext(
  1792. #if NeedFunctionPrototypes
  1793.     Widget         /* widget */
  1794. #endif
  1795. );
  1796.  
  1797. extern XtAppContext XtDisplayToApplicationContext(
  1798. #if NeedFunctionPrototypes
  1799.     Display*        /* dpy */
  1800. #endif
  1801. );
  1802.  
  1803. extern XrmDatabase XtDatabase(
  1804. #if NeedFunctionPrototypes
  1805.     Display*        /* dpy */
  1806. #endif
  1807. );
  1808.  
  1809. extern void XtCloseDisplay(
  1810. #if NeedFunctionPrototypes
  1811.     Display*        /* dpy */
  1812. #endif
  1813. );
  1814.  
  1815. extern void XtCopyFromParent(
  1816. #if NeedFunctionPrototypes
  1817.     Widget        /* widget */,
  1818.     XrmQuark        /* offset */,/* Was int. POHC 91/04/04 */
  1819.     XrmValue*        /* value */
  1820. #endif
  1821. );
  1822.  
  1823. extern void XtCopyDefaultDepth(
  1824. #if NeedFunctionPrototypes
  1825.     Widget        /* widget */,
  1826.     XrmQuark        /* offset */,/* Was int. POHC 91/04/04 */
  1827.     XrmValue*        /* value */
  1828. #endif
  1829. );
  1830.  
  1831. extern void XtCopyDefaultColormap(
  1832. #if NeedFunctionPrototypes
  1833.     Widget        /* widget */,
  1834.     XrmQuark        /* offset */,/* Was int. POHC 91/04/04 */
  1835.     XrmValue*        /* value */
  1836. #endif
  1837. );
  1838.  
  1839. extern void XtCopyAncestorSensitive(
  1840. #if NeedFunctionPrototypes
  1841.     Widget        /* widget */,
  1842.     XrmQuark        /* offset */,/* Was int. POHC 91/04/04 */
  1843.     XrmValue*        /* value */
  1844. #endif
  1845. );
  1846.  
  1847. extern void XtCopyScreen(
  1848. #if NeedFunctionPrototypes
  1849.     Widget        /* widget */,
  1850.     XrmQuark        /* offset */,/* Was int. POHC 91/04/04 */
  1851.     XrmValue*        /* value */
  1852. #endif
  1853. );
  1854.  
  1855. extern void XrmCompileResourceList(
  1856. #if NeedFunctionPrototypes
  1857.     XtResourceList     /* resources */,
  1858.     Cardinal         /* num_resources */
  1859. #endif
  1860. );
  1861.  
  1862. extern void XtGetApplicationResources(
  1863. #if NeedFunctionPrototypes
  1864.     Widget         /* widget */,
  1865.     XtPointer         /* base */,
  1866.     XtResourceList     /* resources */,
  1867.     Cardinal         /* num_resources */,
  1868.     ArgList         /* args */,
  1869.     Cardinal         /* num_args */
  1870. #endif
  1871. );
  1872.  
  1873. extern void XtVaGetApplicationResources(
  1874. #if NeedVarargsPrototypes
  1875.     Widget        /* widget */,
  1876.     XtPointer        /* base */,
  1877.     XtResourceList    /* resources */,
  1878.     Cardinal        /* num_resources */,
  1879.     ...
  1880. #endif
  1881. );
  1882.  
  1883. extern void XtGetSubresources(
  1884. #if NeedFunctionPrototypes
  1885.     Widget         /* widget */,
  1886.     XtPointer         /* base */,
  1887.     CONST String     /* name */,
  1888.     CONST String     /* class */,
  1889.     XtResourceList     /* resources */,
  1890.     Cardinal         /* num_resources */,
  1891.     ArgList         /* args */,
  1892.     Cardinal         /* num_args */
  1893. #endif
  1894. );
  1895.  
  1896. extern void XtVaGetSubresources(
  1897. #if NeedVarargsPrototypes
  1898.     Widget        /* widget */,
  1899.     XtPointer        /* base */,
  1900.     CONST String    /* name */,
  1901.     CONST String    /* class */,
  1902.     XtResourceList    /* resources */,
  1903.     Cardinal        /* num_resources */,
  1904.     ...
  1905. #endif
  1906. );
  1907.  
  1908. extern void XtSetValues(
  1909. #if NeedFunctionPrototypes
  1910.     Widget         /* widget */,
  1911.     ArgList         /* args */,
  1912.     Cardinal         /* num_args */
  1913. #endif
  1914. );
  1915.  
  1916. extern void XtVaSetValues(
  1917. #if NeedVarargsPrototypes
  1918.     Widget        /* widget */,
  1919.     ...
  1920. #endif
  1921. );
  1922.  
  1923. extern void XtGetValues(
  1924. #if NeedFunctionPrototypes
  1925.     Widget         /* widget */,
  1926.     ArgList         /* args */,
  1927.     Cardinal         /* num_args */
  1928. #endif
  1929. );
  1930.  
  1931. extern void XtVaGetValues(
  1932. #if NeedVarargsPrototypes
  1933.     Widget        /* widget */,
  1934.     ...
  1935. #endif
  1936. );
  1937.  
  1938. extern void XtSetSubvalues(
  1939. #if NeedFunctionPrototypes
  1940.     XtPointer         /* base */,
  1941.     XtResourceList     /* resources */,
  1942.     Cardinal         /* num_resources */,
  1943.     ArgList         /* args */,
  1944.     Cardinal         /* num_args */
  1945. #endif
  1946. );
  1947.  
  1948. extern void XtVaSetSubvalues(
  1949. #if NeedVarargsPrototypes
  1950.     XtPointer        /* base */,
  1951.     XtResourceList    /* resources */,
  1952.     Cardinal        /* num_resources */,
  1953.     ...
  1954. #endif
  1955. );
  1956.  
  1957. extern void XtGetSubvalues(
  1958. #if NeedFunctionPrototypes
  1959.     XtPointer         /* base */,
  1960.     XtResourceList     /* resources */,
  1961.     Cardinal         /* num_resources */,
  1962.     ArgList         /* args */,
  1963.     Cardinal         /* num_args */
  1964. #endif
  1965. );
  1966.  
  1967. extern void XtVaGetSubvalues(
  1968. #if NeedVarargsPrototypes
  1969.     XtPointer        /* base */,
  1970.     XtResourceList    /* resources */,
  1971.     Cardinal        /* num_resources */,
  1972.     ...
  1973. #endif
  1974. );
  1975.  
  1976. extern void XtGetResourceList(
  1977. #if NeedFunctionPrototypes
  1978.     WidgetClass     /* widget_class */,
  1979.     XtResourceList*    /* resources_return */,
  1980.     Cardinal*        /* num_resources_return */
  1981. #endif
  1982. );
  1983.  
  1984. extern void XtGetConstraintResourceList(
  1985. #if NeedFunctionPrototypes
  1986.     WidgetClass     /* widget_class */,
  1987.     XtResourceList*    /* resources_return */,
  1988.     Cardinal*        /* num_resources_return */
  1989. #endif
  1990. );
  1991.  
  1992. #define XtUnspecifiedPixmap    ((Pixmap)2)
  1993. #define XtUnspecifiedShellInt    (-1)
  1994. #define XtUnspecifiedWindow    ((Window)2)
  1995. #define XtUnspecifiedWindowGroup ((Window)3)
  1996. #define XtDefaultForeground    "XtDefaultForeground"
  1997. #define XtDefaultBackground    "XtDefaultBackground"
  1998. #define XtDefaultFont        "XtDefaultFont"
  1999.  
  2000. #if defined(CRAY) || defined(__arm)
  2001. #ifdef CRAY2
  2002.  
  2003. #define XtOffset(p_type,field) \
  2004.     (sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
  2005.  
  2006. #else    /* !CRAY2 */
  2007.  
  2008. #define XtOffset(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
  2009.  
  2010. #endif    /* !CRAY2 */
  2011. #else    /* ! (CRAY || __arm) */
  2012.  
  2013. #ifdef MSDOS /* POHC 90/09/10 */
  2014. #if defined(__HIGHC__)
  2015.  
  2016. #define XtOffset(p_type,field)  ((unsigned int)&(((p_type)NULL)->field))
  2017.  
  2018. #else /* !__HIGHC__ */
  2019.  
  2020. #define XtOffset(p_type,field) \
  2021.         ((unsigned long) ((unsigned char *)(&(((p_type)NULL)->field))))
  2022.  
  2023. /* JDC 91/07/31. Removed (char *) cast from XtOffset. Under MSC600a this cast
  2024. sign extended the high order offset values, returning a negative value for offsets
  2025. over 128.
  2026. #define XtOffset(p_type,field) \
  2027.         ((unsigned long) ((char *) (&(((p_type)NULL)->field))))   *********/
  2028.  
  2029.  
  2030. /* POHC 91/01/22
  2031.         ((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
  2032. */
  2033.  
  2034. #endif /* !__HIGHC__ */
  2035. #else /* !MSDOS */
  2036.  
  2037. #define XtOffset(p_type,field) \
  2038.     ((Cardinal) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
  2039.  
  2040. #endif /* !MSDOS */
  2041. #endif /* !CRAY */
  2042.  
  2043. #define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
  2044.  
  2045. #ifdef notdef
  2046. /* this doesn't work on picky compilers */
  2047. #define XtOffset(p_type,field)    ((unsigned int)&(((p_type)NULL)->field))
  2048. #endif
  2049.  
  2050. /*************************************************************
  2051.  *
  2052.  * Error Handling
  2053.  *
  2054.  ************************************************************/
  2055.  
  2056. extern XtErrorMsgHandler XtAppSetErrorMsgHandler(
  2057. #if NeedFunctionPrototypes
  2058.     XtAppContext     /* app */,
  2059.     XtErrorMsgHandler     /* handler */
  2060. #endif
  2061. );
  2062.  
  2063. extern void XtSetErrorMsgHandler(
  2064. #if NeedFunctionPrototypes
  2065.     XtErrorMsgHandler     /* handler */
  2066. #endif
  2067. );
  2068.  
  2069. extern XtErrorMsgHandler XtAppSetWarningMsgHandler(
  2070. #if NeedFunctionPrototypes
  2071.     XtAppContext     /* app */,
  2072.     XtErrorMsgHandler     /* handler */
  2073. #endif
  2074. );
  2075.  
  2076. extern void XtSetWarningMsgHandler(
  2077. #if NeedFunctionPrototypes
  2078.     XtErrorMsgHandler     /* handler */
  2079. #endif
  2080. );
  2081.  
  2082. extern void XtAppErrorMsg(
  2083. #if NeedFunctionPrototypes
  2084.     XtAppContext     /* app */,
  2085.     CONST String     /* name */,
  2086.     CONST String    /* type */,
  2087.     CONST String    /* class */,
  2088.     CONST String    /* defaultp */,
  2089.     String*        /* params */,
  2090.     Cardinal*        /* num_params */
  2091. #endif
  2092. );
  2093.  
  2094. extern void XtErrorMsg(
  2095. #if NeedFunctionPrototypes
  2096.     CONST String     /* name */,
  2097.     CONST String    /* type */,
  2098.     CONST String    /* class */,
  2099.     CONST String    /* defaultp */,
  2100.     String*        /* params */,
  2101.     Cardinal*        /* num_params */
  2102. #endif
  2103. );
  2104.  
  2105. extern void XtAppWarningMsg(
  2106. #if NeedFunctionPrototypes
  2107.     XtAppContext     /* app */,
  2108.     CONST String     /* name */,
  2109.     CONST String     /* type */,
  2110.     CONST String     /* class */,
  2111.     CONST String     /* defaultp */,
  2112.     String*        /* params */,
  2113.     Cardinal*        /* num_params */
  2114. #endif
  2115. );
  2116.  
  2117. extern void XtWarningMsg(
  2118. #if NeedFunctionPrototypes
  2119.     CONST String    /* name */,
  2120.     CONST String    /* type */,
  2121.     CONST String    /* class */,
  2122.     CONST String    /* defaultp */,
  2123.     String*        /* params */,
  2124.     Cardinal*        /* num_params */
  2125. #endif
  2126. );
  2127.  
  2128. extern XtErrorHandler XtAppSetErrorHandler(
  2129. #if NeedFunctionPrototypes
  2130.     XtAppContext     /* app */,
  2131.     XtErrorHandler     /* handler */
  2132. #endif
  2133. );
  2134.  
  2135. extern void XtSetErrorHandler(
  2136. #if NeedFunctionPrototypes
  2137.     XtErrorHandler     /* handler */
  2138. #endif
  2139. );
  2140.  
  2141. extern XtErrorHandler XtAppSetWarningHandler(
  2142. #if NeedFunctionPrototypes
  2143.     XtAppContext     /* app */,
  2144.     XtErrorHandler     /* handler */
  2145. #endif
  2146. );
  2147.  
  2148. extern void XtSetWarningHandler(
  2149. #if NeedFunctionPrototypes
  2150.     XtErrorHandler     /* handler */
  2151. #endif
  2152. );
  2153.  
  2154. extern void XtAppError(
  2155. #if NeedFunctionPrototypes
  2156.     XtAppContext     /* app */,
  2157.     CONST String    /* message */
  2158. #endif
  2159. );
  2160.  
  2161. extern void XtError(
  2162. #if NeedFunctionPrototypes
  2163.     CONST String    /* message */
  2164. #endif
  2165. );
  2166.  
  2167. extern void XtAppWarning(
  2168. #if NeedFunctionPrototypes
  2169.     XtAppContext     /* app */,
  2170.     CONST String    /* message */
  2171. #endif
  2172. );
  2173.  
  2174. extern void XtWarning(
  2175. #if NeedFunctionPrototypes
  2176.     CONST String    /* message */
  2177. #endif
  2178. );
  2179.  
  2180. extern XrmDatabase *XtAppGetErrorDatabase(
  2181. #if NeedFunctionPrototypes
  2182.     XtAppContext     /* app */
  2183. #endif
  2184. );
  2185.  
  2186. extern XrmDatabase *XtGetErrorDatabase(
  2187. #if NeedFunctionPrototypes
  2188.     void
  2189. #endif
  2190. );
  2191.  
  2192. extern void XtAppGetErrorDatabaseText(
  2193. #if NeedFunctionPrototypes
  2194.     XtAppContext     /* app */,
  2195.     CONST String    /* name */,
  2196.     CONST String    /* type */,
  2197.     CONST String    /* class */,
  2198.     CONST String     /* defaultp */,
  2199.     String         /* buffer */,
  2200.     int         /* nbytes */,
  2201.     XrmDatabase     /* database */
  2202. #endif
  2203. );
  2204.  
  2205. extern void XtGetErrorDatabaseText(
  2206. #if NeedFunctionPrototypes
  2207.     CONST String    /* name */,
  2208.     CONST String    /* type */,
  2209.     CONST String    /* class */,
  2210.     CONST String     /* defaultp */,
  2211.     String         /* buffer */,
  2212.     int         /* nbytes */
  2213. #endif
  2214. );
  2215.  
  2216. /****************************************************************
  2217.  *
  2218.  * Memory Management
  2219.  *
  2220.  ****************************************************************/
  2221.  
  2222. #define XtNew(type) ((type *) XtMalloc((unsigned) sizeof(type)))
  2223. #define XtNewString(str) \
  2224.     ((str) != NULL ? (strcpy(XtMalloc((unsigned)strlen(str) + 1), str)) : NULL)
  2225.  
  2226. extern char *XtMalloc(
  2227. #if NeedFunctionPrototypes
  2228.     Cardinal         /* size */
  2229. #endif
  2230. );
  2231.  
  2232. extern char *XtCalloc(
  2233. #if NeedFunctionPrototypes
  2234.     Cardinal        /* num */,
  2235.     Cardinal         /* size */
  2236. #endif
  2237. );
  2238.  
  2239. extern char *XtRealloc(
  2240. #if NeedFunctionPrototypes
  2241.     char*         /* ptr */,
  2242.     Cardinal         /* num */
  2243. #endif
  2244. );
  2245.  
  2246. extern void XtFree(
  2247. #if NeedFunctionPrototypes
  2248.     char*        /* ptr */
  2249. #endif
  2250. );
  2251.  
  2252.  
  2253. /*************************************************************
  2254.  *
  2255.  *  Work procs
  2256.  *
  2257.  **************************************************************/
  2258.  
  2259. extern XtWorkProcId XtAddWorkProc(
  2260. #if NeedFunctionPrototypes
  2261.     XtWorkProc         /* proc */,
  2262.     XtPointer         /* closure */
  2263. #endif
  2264. );
  2265.  
  2266. extern XtWorkProcId XtAppAddWorkProc(
  2267. #if NeedFunctionPrototypes
  2268.     XtAppContext     /* app */,
  2269.     XtWorkProc         /* proc */,
  2270.     XtPointer         /* closure */
  2271. #endif
  2272. );
  2273.  
  2274. extern void  XtRemoveWorkProc(
  2275. #if NeedFunctionPrototypes
  2276.     XtWorkProcId     /* id */
  2277. #endif
  2278. );
  2279.  
  2280.  
  2281. /****************************************************************
  2282.  *
  2283.  * Graphic Context Management
  2284.  *****************************************************************/
  2285.  
  2286. extern GC XtGetGC(
  2287. #if NeedFunctionPrototypes
  2288.     Widget         /* widget */,
  2289.     XtGCMask         /* valueMask */,
  2290.     XGCValues*         /* values */
  2291. #endif
  2292. );
  2293.  
  2294. extern void XtDestroyGC(
  2295. #if NeedFunctionPrototypes
  2296.     GC             /* gc */
  2297. #endif
  2298. );
  2299.  
  2300. extern void XtReleaseGC(
  2301. #if NeedFunctionPrototypes
  2302.     Widget         /* object */,
  2303.     GC             /* gc */
  2304. #endif
  2305. );
  2306.  
  2307.  
  2308.  
  2309. extern void XtReleaseCacheRef(
  2310. #if NeedFunctionPrototypes
  2311.     XtCacheRef*        /* cache_ref */
  2312. #endif
  2313. );
  2314.  
  2315. extern void XtCallbackReleaseCacheRef(
  2316. #if NeedFunctionPrototypes
  2317.     Widget         /* widget */,
  2318.     XtPointer         /* closure */,    /* XtCacheRef */
  2319.     XtPointer         /* call_data */
  2320. #endif
  2321. );
  2322.  
  2323. extern void XtCallbackReleaseCacheRefList(
  2324. #if NeedFunctionPrototypes
  2325.     Widget         /* widget */,
  2326.     XtPointer         /* closure */,    /* XtCacheRef* */
  2327.     XtPointer         /* call_data */
  2328. #endif
  2329. );
  2330.  
  2331. extern void XtSetWMColormapWindows(
  2332. #if NeedFunctionPrototypes
  2333.     Widget         /* widget */,
  2334.     Widget*        /* list */,
  2335.     Cardinal        /* count */
  2336. #endif
  2337. );
  2338.  
  2339. extern String XtFindFile(
  2340. #if NeedFunctionPrototypes
  2341.     CONST String    /* path */,
  2342.     Substitution    /* substitutions */,
  2343.     Cardinal         /* num_substitutions */,
  2344.     XtFilePredicate    /* predicate */
  2345. #endif
  2346. );
  2347.  
  2348. extern String XtResolvePathname(
  2349. #if NeedFunctionPrototypes
  2350.     Display*        /* dpy */,
  2351.     CONST String    /* type */,
  2352.     CONST String    /* filename */,
  2353.     CONST String    /* suffix */,
  2354.     CONST String    /* path */,
  2355.     Substitution    /* substitutions */,
  2356.     Cardinal        /* num_substitutions */,
  2357.     XtFilePredicate     /* predicate */
  2358. #endif
  2359. );
  2360.  
  2361.  
  2362. /****************************************************************
  2363.  *
  2364.  * Selections
  2365.  *****************************************************************/
  2366.  
  2367. #define XT_CONVERT_FAIL (Atom)0x80000001
  2368.     
  2369.  
  2370. /*
  2371.  * The given widget no longer wants the selection.  If it still owns it, then
  2372.  * the selection owner is cleared, and the window's losesSelection is called.
  2373.  */
  2374.  
  2375. extern void XtDisownSelection(
  2376. #if NeedFunctionPrototypes
  2377.     Widget         /* widget */,
  2378.     Atom         /* selection */,
  2379.     Time         /* time */
  2380. #endif
  2381. );
  2382.  
  2383. /*
  2384.  * Get the value of the given selection.  
  2385.  */
  2386.  
  2387. extern void XtGetSelectionValue(
  2388. #if NeedFunctionPrototypes
  2389.     Widget         /* widget */,
  2390.     Atom         /* selection */,
  2391.     Atom         /* target */,
  2392.     XtSelectionCallbackProc /* callback */,
  2393.     XtPointer         /* closure */,
  2394.     Time         /* time */
  2395. #endif
  2396. );
  2397.  
  2398. extern void XtGetSelectionValues(
  2399. #if NeedFunctionPrototypes
  2400.     Widget         /* widget */,
  2401.     Atom         /* selection */,
  2402.     Atom*        /* targets */,
  2403.     int         /* count */,
  2404.     XtSelectionCallbackProc /* callback */,
  2405.     XtPointer*        /* closures */,
  2406.     Time         /* time */
  2407. #endif
  2408. );
  2409.  
  2410.  
  2411. /* Set the selection timeout value, in units of milliseconds */
  2412.  
  2413. extern void XtAppSetSelectionTimeout(
  2414. #if NeedFunctionPrototypes
  2415.     XtAppContext     /* app */,
  2416.     unsigned long     /* timeout */
  2417. #endif
  2418. );
  2419.  
  2420. extern void XtSetSelectionTimeout(
  2421. #if NeedFunctionPrototypes
  2422.     unsigned long     /* timeout */
  2423. #endif
  2424. );
  2425.  
  2426.  /* Return the selection timeout value, in units of milliseconds */
  2427.  
  2428. extern unsigned int XtAppGetSelectionTimeout(
  2429. #if NeedFunctionPrototypes
  2430.     XtAppContext     /* app */
  2431. #endif
  2432. );
  2433.  
  2434. extern unsigned int XtGetSelectionTimeout(
  2435. #if NeedFunctionPrototypes
  2436.     void
  2437. #endif
  2438. );
  2439.  
  2440. extern XSelectionRequestEvent *XtGetSelectionRequest(
  2441. #if NeedFunctionPrototypes
  2442.     Widget         /* widget */,
  2443.     Atom         /* selection */,
  2444.     XtRequestId     /* request_id */
  2445. #endif
  2446. );
  2447.  
  2448. extern void XtGetSelectionValueIncremental(
  2449. #if NeedFunctionPrototypes
  2450.     Widget         /* widget */,
  2451.     Atom         /* selection */,
  2452.     Atom         /* target */,
  2453.     XtSelectionCallbackProc /* selection_callback */,
  2454.     XtPointer         /* client_data */,
  2455.     Time         /* time */
  2456. #endif
  2457. );
  2458.  
  2459. extern void XtGetSelectionValuesIncremental(
  2460. #if NeedFunctionPrototypes
  2461.     Widget         /* widget */,
  2462.     Atom         /* selection */,
  2463.     Atom*        /* targets */,
  2464.     int         /* count */,
  2465.     XtSelectionCallbackProc /* callback */,
  2466.     XtPointer*        /* client_data */,
  2467.     Time         /* time */
  2468. #endif
  2469. );
  2470.  
  2471. extern void XtGrabKey(
  2472. #if NeedFunctionPrototypes
  2473.     Widget         /* widget */,
  2474.     KeyCode         /* keycode */,
  2475.     Modifiers         /* modifiers */,
  2476.     Boolean         /* owner_events */,
  2477.     int         /* pointer_mode */,
  2478.     int         /* keyboard_mode */
  2479. #endif
  2480. );
  2481.  
  2482. extern void XtUngrabKey(
  2483. #if NeedFunctionPrototypes
  2484.     Widget         /* widget */,
  2485.     KeyCode         /* keycode */,
  2486.     Modifiers         /* modifiers */
  2487. #endif
  2488. );
  2489.  
  2490. extern int XtGrabKeyboard(
  2491. #if NeedFunctionPrototypes
  2492.     Widget         /* widget */,
  2493.     Boolean         /* owner_events */,
  2494.     int         /* pointer_mode */,
  2495.     int         /* keyboard_mode */,
  2496.     Time         /* time */
  2497. #endif
  2498. );
  2499.  
  2500. extern void XtUngrabKeyboard(
  2501. #if NeedFunctionPrototypes
  2502.     Widget         /* widget */,
  2503.     Time         /* time */
  2504. #endif
  2505. );
  2506.  
  2507. extern void XtGrabButton(
  2508. #if NeedFunctionPrototypes
  2509.     Widget         /* widget */,
  2510.     int         /* button */,
  2511.     Modifiers         /* modifiers */,
  2512.     Boolean         /* owner_events */,
  2513.     unsigned int    /* event_mask */,
  2514.     int         /* pointer_mode */,
  2515.     int         /* keyboard_mode */,
  2516.     Window         /* confine_to */,
  2517.     Cursor         /* cursor */
  2518. #endif
  2519. );
  2520.  
  2521. extern void XtUngrabButton(
  2522. #if NeedFunctionPrototypes
  2523.     Widget         /* widget */,
  2524.     unsigned int    /* button */,
  2525.     Modifiers         /* modifiers */
  2526. #endif
  2527. );
  2528.  
  2529. extern int XtGrabPointer(
  2530. #if NeedFunctionPrototypes
  2531.     Widget         /* widget */,
  2532.     Boolean         /* owner_events */,
  2533.     unsigned int    /* event_mask */,
  2534.     int         /* pointer_mode */,
  2535.     int         /* keyboard_mode */,
  2536.     Window         /* confine_to */,
  2537.     Cursor         /* cursor */,
  2538.     Time         /* time */
  2539. #endif
  2540. );
  2541.  
  2542. extern void XtUngrabPointer(
  2543. #if NeedFunctionPrototypes
  2544.     Widget         /* widget */,
  2545.     Time         /* time */
  2546. #endif
  2547. );
  2548.  
  2549. extern void XtGetApplicationNameAndClass(
  2550. #if NeedFunctionPrototypes
  2551.     Display*        /* dpy */,
  2552.     String*        /* name_return */,
  2553.     String*        /* class_return */
  2554. #endif
  2555. );
  2556.  
  2557. #ifdef __cplusplus
  2558. }                        /* for C++ V2.0 */
  2559. #endif
  2560.  
  2561. #if NeedWidePrototypes
  2562. #undef Boolean
  2563. #undef Dimension
  2564. #undef KeyCode
  2565. #undef Position
  2566. #undef XtEnum
  2567. #endif /* NeedWidePrototypes */
  2568.  
  2569. #undef String
  2570. #undef CONST
  2571.  
  2572. #endif /*_XtIntrinsic_h*/
  2573. /* DON'T ADD STUFF AFTER THIS #endif */
  2574.